package chapter1.util;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.zip.DataFormatException;

/**
 * 工具类-日期时间操作
 *
 * @author 郑植航
 * @since 2025/6/11 19:40
 */
public class DateTimeUtils {
    private static final DateTimeFormatter formatter =DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

    private DateTimeUtils(){
    }

    public static String format(LocalDateTime dateTime){
        return dateTime.format(formatter);

    }

}
